/*
package com.pie4cloud.pie.job.biz.controller;

import cn.hutool.extra.spring.SpringUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pie4cloud.pie.common.core.util.R;
import com.pie4cloud.pie.common.log.annotation.SysLog;

import com.pie4cloud.pie.job.api.entity.JobInfoEntity;
import com.pie4cloud.pie.job.biz.enums.ExecuteEnum;
import com.pie4cloud.pie.job.biz.service.DispenseService;
import com.pie4cloud.pie.job.biz.service.execute.ExecuteService;
import com.pie4cloud.pie.job.biz.thread.ScheduleThread;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequiredArgsConstructor
@RequestMapping("/dispense" )
public class DispenseController {
	private final DispenseService dispenseService;

	private final ScheduleThread scheduleThread;

	@ApiOperation(value = "分页查询", notes = "分页查询")
	@GetMapping("/page" )
	public R getTDataJobInfoPage(Page page, DispenseEntity dispenseEntity) {
		return R.ok(dispenseService.page(page,dispenseEntity));
	}

	*/
/**
	 * 通过id查询
	 * @param id id
	 * @return R
	 *//*

	@ApiOperation(value = "通过id查询", notes = "通过id查询")
	@GetMapping("/{id}" )
	public R getById(@PathVariable("id" ) Integer id) {
		return R.ok(dispenseService.getById(id));
	}

	*/
/**
	 * 新增
	 * @param dispenseEntity
	 * @return R
	 *//*

	@ApiOperation(value = "新增", notes = "新增")
	@SysLog("新增" )
	@PostMapping
	public R save(@RequestBody DispenseEntity dispenseEntity) {
		return R.ok(dispenseService.save(dispenseEntity));
	}

	*/
/**
	 * 修改
	 * @param dispenseEntity
	 * @return R
	 *//*

	@ApiOperation(value = "修改", notes = "修改")
	@SysLog("修改" )
	@PutMapping
	public R updateById(@RequestBody DispenseEntity dispenseEntity) {
		return R.ok(dispenseService.update(dispenseEntity));
	}

	*/
/**
	 * 通过id删除
	 * @param id id
	 * @return R
	 *//*

	@ApiOperation(value = "通过id删除", notes = "通过id删除")
	@SysLog("通过id删除" )
	@DeleteMapping("/{id}" )
	public R removeById(@PathVariable Integer id) {
		return R.ok(dispenseService.removeById(id));
	}


	@ApiOperation(value = "立即执行", notes = "立即执行")
	@SysLog("立即执行任务" )
	@GetMapping("/execute/{id}" )
	public R execute(@PathVariable Integer id) {
		DispenseEntity dispenseEntity=dispenseService.getById(id);
		dispenseEntity.setType("DISPENSE");
		dispenseEntity.setTriggerLastTime(System.currentTimeMillis());
		scheduleThread.handT(dispenseEntity);
		return R.ok();
	}
}
*/
